package com.example.take_out_dish.exceptions.enumetation;

import lombok.Getter;

@Getter
public enum ResponseEnum {
    SUCCESS(20000, "成功"),
    ERROR(50000, "失败"),
    UNKNOWN_ERROR(-1, "未知错误"),
    TOKEN_ERROR(30000, "token错误"),
    TOKEN_EXPIRED(30002, "token过期"),
    INVALID_ACCOUNT(30001, "账号不存在或者密码不正确"),

    CATEGORY_ERROR(40000, "分类异常"),
    DISH_ERROR(40001, "菜品异常"),
    SETMEAL_ENABLE_FAILED(40005,"套餐内包含未启售菜品，无法启售"),
    SETMEAL_ON_SALE(40006,"起售中的套餐不能删除"),
    NOT_EXIST(40007, "操作内容不存在");

    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
